package cn.tedu.tmall.common.ex;

import cn.tedu.tmall.common.ServiceCodeEnum;

public class ServiceException extends RuntimeException{
    /**
     * 状态码
     */
    private Integer code;

    /**
     * 消息
     */
    private String message;

    public ServiceException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public ServiceException(ServiceCodeEnum serviceCodeEnum, String message) {
        super(message);
        this.code = serviceCodeEnum.getCode();
    }
}
